package com.xugui.learn.order.pojo.request;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 订单项请求参数
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderItemRequest {
    /**
     * 商品 id
     */
    @NotNull(message = "商品id不能为空")
    private Long productId;

    /**
     * 商品数量
     */
    @Positive(message = "商品数量不能小于0")
    private Integer count;
}
